using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Entities;
using Dao;

namespace Doctors_WebForum.UIControl.Contents
{
    public partial class Category : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //Return all posts of a category
            if (Request["catid"] != null)
            {
                //category header
                /*CategoryData categoryData = new CategoryData();
                IList<Entities.Category> categories = new List<Category>();
                categoryData.GetByID(Convert.ToInt32(Request["catid"]));
                categories.Add(category);

                rptCategory.DataSource = categories;
                rptCategory.DataBind();*/

                PostData postData = new PostData();
                rptAllPostsByCategory.DataSource = postData.GetAll();
                rptAllPostsByCategory.DataBind();
            }
        }
    }
}